home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / oper_sys / mach / amiga / scsi9091.lzh / deleteport.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-24  |  478 b   |  24 lines

  1. #include <exec/types.h>
  2. #include <exec/ports.h>
  3. #ifdef __GNUC__
  4. #define BASE_EXT_DECL
  5. #define BASE_NAME (*(void **)4)
  6. #include <inline/exec.h>
  7. #endif
  8.  
  9. void
  10. DeletePort(port)
  11.     struct MsgPort *port;
  12. {
  13.   if ( port->mp_Node.ln_Name ) /* if it was public */
  14.     RemPort(port);
  15.  
  16.   /* make it difficult to reuse the port */
  17.   port->mp_SigTask = (struct Task *)-1;
  18.   port->mp_MsgList.lh_Head = (struct Node *)-1;
  19.   
  20.   FreeSignal(port->mp_SigBit);
  21.   
  22.   FreeMem(port, sizeof(*port));
  23. }
  24.